package com.ce.pms.occupation.model;

// Generated 2008-12-24 13:41:51 by Hibernate Tools 3.2.0.b9

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.ce.pms.common.model.HmEmployeeDomain;
import com.ce.pms.house.model.HouseDomain;
import com.sitechasia.webx.core.model.IDomainObject;

/**
 * 实体名称: 物品托管 关联数据表:OM_THING_ENTRUST
 *
 * @author yandawei
 * @CreateDate:2008-12-24
 */
@Entity
@Table(name = "OM_THING_ENTRUST")
public class ThingEntrustDO implements IDomainObject {

	/**
	 * 主键
	 */
	@Id
	@GeneratedValue
	@Column(name = "THING_ENTRUST_ID", unique = true, nullable = false)
	private Long keyword;

	/**
	 * 房间
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "HOUSE_ID", nullable = false)
	private HouseDomain house;

	/**
	 * 托管人
	 */
	@Column(name = "ENTRUST_MAN", nullable = false, length = 36)
	private String entrustMan;

	/**
	 * 托管物品
	 */
	@Column(name = "ENTRUST_ITEM", nullable = false, length = 100)
	private String entrustItem;

	/**
	 * 接受人
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "EMPLOYEE_ID", nullable = false)
	private HmEmployeeDomain accepter;

	/**
	 * 接受日期
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "ACCEPT_DATE", nullable = false, length = 19)
	private Date acceptDate;

	/**
	 * 托管原因
	 */
	@Column(name = "ENTRUST_REASON", nullable = false, length = 200)
	private String entrustReason;
	
	/**
	 * 是否有效。 1 -有效 ； 0-无效 （默认有效，用于逻辑删除）
	 */
	@Column(name = "ENABLE_STATE", nullable = false, length = 1)
	private String enableState;
	
	public ThingEntrustDO() {
	}

	public ThingEntrustDO(Long keyword) {
		this.keyword = keyword;
	}

	public HmEmployeeDomain getAccepter() {
		return accepter;
	}

	public void setAccepter(HmEmployeeDomain accepter) {
		this.accepter = accepter;
	}

	public HouseDomain getHouse() {
		return house;
	}

	public void setHouse(HouseDomain house) {
		this.house = house;
	}

	public Long getKeyword() {
		return keyword;
	}

	public void setKeyword(Long keyword) {
		this.keyword = keyword;
	}

	public String getEntrustMan() {
		return this.entrustMan;
	}

	public void setEntrustMan(String entrustMan) {
		this.entrustMan = entrustMan;
	}

	public String getEntrustItem() {
		return this.entrustItem;
	}

	public void setEntrustItem(String entrustItem) {
		this.entrustItem = entrustItem;
	}

	public Date getAcceptDate() {
		return this.acceptDate;
	}

	public void setAcceptDate(Date acceptDate) {
		this.acceptDate = acceptDate;
	}

	public String getEntrustReason() {
		return this.entrustReason;
	}

	public void setEntrustReason(String entrustReason) {
		this.entrustReason = entrustReason;
	}

	public String getEnableState()
	{
		return enableState;
	}

	public void setEnableState(String enableState)
	{
		this.enableState = enableState;
	}

}
